FROM alpine
LABEL Version="v1.0.0"
LABEL org.opencontainers.iamge.authors = "vincent321x@gmail.com"
WORKDIR /var/local/task_assignment_system
RUN set -eux && sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
RUN mkdir -p /var/local/task_assignment_system/internal/static/cover
RUN mkdir -p /var/local/task_assignment_system/export
RUN mkdir /etc/task_assignment_system
RUN apk update && apk --no-cache add ca-certificates
RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shanghai" > /etc/timezone
COPY ./config /etc/task_assignment_system
COPY ./internal/static /var/local/task_assignment_system/internal/static
COPY ./main .
EXPOSE 8080
ENTRYPOINT ["./main"]
